# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=aspell-en
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=2020.12.07
pkgrel=1
pkgdesc="English dictionary for aspell (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
url="http://aspell.net/"
license=('custom')
depends=("${MINGW_PACKAGE_PREFIX}-aspell")
makedepends=("${MINGW_PACKAGE_PREFIX}-autotools")
source=("https://ftp.gnu.org/gnu/aspell/dict/en/aspell6-en-${pkgver}-0.tar.bz2"{,.sig}
        001-unixy-dirs.patch)
sha256sums=('4c8f734a28a088b88bb6481fcf972d0b2c3dc8da944f7673283ce487eac49fb3'
            'SKIP'
            '1e2680a4e6498e1a2eb4e0e1f52eac3c8b2d76627ab8df7bb36bdc686d814ad3')
validpgpkeys=('78DEC3DB0AEA763951322BBF71C636695B147849') # Aspell Dictionary Upload

prepare() {
  cd "${srcdir}/aspell6-en-${pkgver}-0"
  patch -p1 -i ${srcdir}/001-unixy-dirs.patch
}

build() {
  cd "${srcdir}/aspell6-en-${pkgver}-0"
  ./configure
  make
}

package() {
  cd "${srcdir}/aspell6-en-${pkgver}-0"
  make DESTDIR="${pkgdir}" install

  install -D -m644 Copyright "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
}
